package com.tzl.design_pattern.strategy_pattern;

/**
 * 支付方式的枚举
 *
 * @author Zhilei Tang
 * @date Created in 2020/11/14 17:30
 */
public enum PayTypeEnum {
  WechatPay(new WechatPayStrategy()),
  AliPay(new AliPayStrategy());

  private final PayStrategy payType;

  PayTypeEnum(PayStrategy payType) {
    this.payType = payType;
  }

  public PayStrategy getPayType() {
    return payType;
  }
}
